package com.gjintel.business.webcontent.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name = "t_web_content_info")
@SuppressWarnings("serial")
public class WebContent implements Serializable {
	private String id;
	// 文章类别
	private String type;
	// 类型名称
	private String typeName;
	// 文章内容
	private String content;
	// 文章标题题
	private String title;
	// 排序
	private Integer disSort;
	// 是否显示
	private Integer isDisplay;
	private Date createTime;
	private Date updateTime;
	private String createrId;
	private String updaterId;
	private String createrName;
	private String updaterName;
	private Integer flag = 0;
	private String deptId;
	private String deptName;
	private String deptUnitId;//地区
	
	private String pDeptName;//地区名称
	private String projectId;//项目id
	private Integer isOpen=4;//是否开标0 开标，1：未开标，2：正在公示，3：公示结束, 4:无
	
	private Date endShowTime=new Date();//展示结束时间
	
//	EXPLORE_USER_ID
	private String exploreUserId;//禁投用户id(曝光)
	private String exploreUserName;//禁投用户名(曝光)
	private Date confirmTime;//中标确认时间
	
	
	public WebContent() {

	}

	public WebContent(String id, String title) {
		this.id = id;
		this.title = title;
	}
	
	
	public WebContent(String id, String title,Date createTime) {
		this.id = id;
		this.title = title;
		this.createTime = createTime;
	}
	
//	public WebContent(String id, String title,Date createTime,String deptName) {
//		this.id = id;
//		this.title = title;
//		this.createTime = createTime;
//		this.deptName=deptName;
//	}
	
	public WebContent(String id, String title,Date createTime,String deptUnitId) {
		this.id = id;
		this.title = title;
		this.createTime = createTime;
		this.deptUnitId=deptUnitId;
	}
	
	public WebContent(String id, String type,String typeName, String content, String title, Integer disSort, Integer isDisplay, Date createTime, Date updateTime, String createrId, String updaterId,
			String createrName, String updaterName, Integer flag) {
		this.id = id;
		this.type = type;
		this.typeName = typeName;
		this.content = content;
		this.title = title;
		this.disSort = disSort;
		this.isDisplay = isDisplay;
		this.createTime = createTime;
		this.updateTime = updateTime;
		this.createrId = createrId;
		this.updaterId = updaterId;
		this.createrName = createrName;
		this.updaterName = updaterName;
		this.flag = flag;
	}
	
	public WebContent(String id, String type,String typeName, String content, String title, Integer disSort, Integer isDisplay, Date createTime, Date updateTime, String createrId, String updaterId,
			String createrName, String updaterName,String exploreUserId, Integer flag,Date endShowTime) {
		this.id = id;
		this.type = type;
		this.typeName = typeName;
		this.content = content;
		this.title = title;
		this.disSort = disSort;
		this.isDisplay = isDisplay;
		this.createTime = createTime;
		this.updateTime = updateTime;
		this.createrId = createrId;
		this.updaterId = updaterId;
		this.createrName = createrName;
		this.updaterName = updaterName;
		this.exploreUserId=exploreUserId;
		this.flag = flag;
		this.endShowTime = endShowTime;
	}
	
	public WebContent(String id, String type,String typeName, String content, String title, Integer disSort, Integer isDisplay, Date createTime, Date updateTime, String createrId, String updaterId,
			String createrName, String updaterName,String projectId) {
		this.id = id;
		this.type = type;
		this.typeName = typeName;
		this.content = content;
		this.title = title;
		this.disSort = disSort;
		this.isDisplay = isDisplay;
		this.createTime = createTime;
		this.updateTime = updateTime;
		this.createrId = createrId;
		this.updaterId = updaterId;
		this.createrName = createrName;
		this.updaterName = updaterName;
		this.projectId=projectId;
	}
	
	public WebContent(String id, String type,String typeName, String content, String title, Integer disSort, Integer isDisplay, Date createTime, Date updateTime, String createrId, String updaterId,
			String createrName, String updaterName, Integer flag,String deptName) {
		this.id = id;
		this.type = type;
		this.typeName = typeName;
		this.content = content;
		this.title = title;
		this.disSort = disSort;
		this.isDisplay = isDisplay;
		this.createTime = createTime;
		this.updateTime = updateTime;
		this.createrId = createrId;
		this.updaterId = updaterId;
		this.createrName = createrName;
		this.updaterName = updaterName;
		this.flag = flag;
		this.deptName = deptName;
	}
	
	public WebContent(String id, String type,String typeName, String content, String title, Integer disSort, Integer isDisplay, Date createTime, Date updateTime, String createrId, String updaterId,
			String createrName, String updaterName,Date endShowTime) {
		this.id = id;
		this.type = type;
		this.typeName = typeName;
		this.content = content;
		this.title = title;
		this.disSort = disSort;
		this.isDisplay = isDisplay;
		this.createTime = createTime;
		this.updateTime = updateTime;
		this.createrId = createrId;
		this.updaterId = updaterId;
		this.createrName = createrName;
		this.updaterName = updaterName;
		this.endShowTime=endShowTime;
	}
	
	@Column(name = "DEPT_ID", insertable = true, updatable = true)
	public String getDeptId() {
		return deptId;
	}

	public void setDeptId(String deptId) {
		this.deptId = deptId;
	}

	@Column(name = "DEPT_NAME", insertable = true, updatable = true)
	public String getDeptName() {
		return deptName;
	}

	public void setDeptName(String deptName) {
		this.deptName = deptName;
	}

	@Transient
	public String getTypeName() {
		return typeName;
	}

	public void setTypeName(String typeName) {
		this.typeName = typeName;
	}

	/**
	 * 控制是否显示
	 * 
	 * @return
	 */
	@Column(name = "IS_DISPLAY", insertable = true, updatable = true)
	public Integer getIsDisplay() {
		return isDisplay;
	}

	public void setIsDisplay(Integer isDisplay) {
		this.isDisplay = isDisplay;
	}

	@Id
	@GeneratedValue(generator = "UIDGenerator")
	@GenericGenerator(name = "UIDGenerator", strategy = "org.hibernate.id.UUIDHexGenerator")
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	@Lob
	@org.hibernate.annotations.Type(type = "text")
	@Column(name = "CONTENT", insertable = true, updatable = true)
	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@Column(name = "TITILE", insertable = true, updatable = true)
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	@Column(name = "DIS_SORT", insertable = true, updatable = true)
	public Integer getDisSort() {
		return disSort;
	}

	public void setDisSort(Integer disSort) {
		this.disSort = disSort;
	}

	@Column(name = "CREATE_TIME", insertable = true, updatable = true)
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Column(name = "UPDATE_TIME", insertable = true, updatable = true)
	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	@Column(name = "CREATER_ID", insertable = true, updatable = true)
	public String getCreaterId() {
		return createrId;
	}

	public void setCreaterId(String createrId) {
		this.createrId = createrId;
	}

	@Column(name = "UPDATER_ID", insertable = true, updatable = true)
	public String getUpdaterId() {
		return updaterId;
	}

	public void setUpdaterId(String updaterId) {
		this.updaterId = updaterId;
	}

	@Column(name = "CREATER_NAME", insertable = true, updatable = true)
	public String getCreaterName() {
		return createrName;
	}

	public void setCreaterName(String createrName) {
		this.createrName = createrName;
	}

	@Column(name = "UPDATER_NAME", insertable = true, updatable = true)
	public String getUpdaterName() {
		return updaterName;
	}

	public void setUpdaterName(String updaterName) {
		this.updaterName = updaterName;
	}

	public Integer getFlag() {
		return flag;
	}

	public void setFlag(Integer flag) {
		this.flag = flag;
	}

	public void setpDeptName(String pDeptName) {
		this.pDeptName = pDeptName;
	}

	@Transient
	public String getpDeptName() {
		return pDeptName;
	}

	public void setDeptUnitId(String deptUnitId) {
		this.deptUnitId = deptUnitId;
	}

	@Transient
	public String getDeptUnitId() {
		return deptUnitId;
	}

	@Column(name="PROJ_ID")
	public String getProjectId() {
		return projectId;
	}

	public void setProjectId(String projectId) {
		this.projectId = projectId;
	}

	@Transient
	public Integer getIsOpen() {
		return isOpen;
	}

	public void setIsOpen(Integer isOpen) {
		this.isOpen = isOpen;
	}

	@Column(name="END_SHOW_TIME")
	public Date getEndShowTime() {
		return endShowTime;
	}

	public void setEndShowTime(Date endShowTime) {
		this.endShowTime = endShowTime;
	}

	@Column(name = "EXPLORE_USER_NAME")
	public String getExploreUserName() {
		return exploreUserName;
	}

	public void setExploreUserName(String exploreUserName) {
		this.exploreUserName = exploreUserName;
	}
	@Column(name = "EXPLORE_USER_ID")
	public String getExploreUserId() {
		return exploreUserId;
	}

	public void setExploreUserId(String exploreUserId) {
		this.exploreUserId = exploreUserId;
	}

	@Transient
	public Date getConfirmTime() {
		return confirmTime;
	}

	public void setConfirmTime(Date confirmTime) {
		this.confirmTime = confirmTime;
	}
	
	
}
